from fastapi import FastAPI
from routes import api_router
from models import Base, engine

app = FastAPI()
app.include_router(api_router, prefix="/api")

@app.on_event("startup")
def startup_event():
    Base.metadata.create_all(bind=engine)

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000,debug=True)
